import api from './_api'
const actions = {
  loadProgramList () {
    return api.getProgramList().then(response => response.data.programs)
  },

  loadWorkouts (context, baseProgramId) {
    return api.getWorkoutList(baseProgramId).then(response => response.data)
  },

  saveProgram (context, program) {
    return api.putProgram(program)
  }
}
export default actions
